﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

using QuDao;
using FineUICore;
using Kalman;
using Kalman.Extensions;

namespace AdminUI.Pages.SysManage
{
    public partial class RoleEditModel : BaseModel
    {
        public void OnGet(int id)
        {
            Current = RoleBO.Instance.GetItem<Role>(id);
        }

        public Role Current { get; set; }

        public IActionResult OnPostBtnSubmit_Click(RoleDto dto)
        {
            RoleBO.Instance.Modify(dto);
            //LogAction(ActionType.ÐÞ¸Ä, $"ÐÞ¸Ä½ÇÉ«£º{dto.RoleID}-{dto.RoleName}");

            FineUICore.PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
            //ActiveWindow.HidePostBack();
            return UIHelper.Result();
        }

    }
}